package com.scau.XFourPOS.service;

import java.util.List;

import com.scau.XFourPOS.dao.BaseDao;
import com.scau.XFourPOS.utils.PageUtils;

public interface BaseService<T> {
	public abstract BaseDao<T> getEntityDao();
	public T loadEntityById(final int id);
	public T loadEntityByKey(String key, String value);
	public void saveEntity(final T entity);
	public void updateEntity(final T entity);
	public void deleteEntity(final T entity);
	public void deleteEntityById(final int id);
	public List<T> loadAll();
	public boolean isExitEntity(String key,String value);
	public PageUtils<T> loadAllByPage(PageUtils<T> pageUtils);
	public PageUtils<T> loadByPageAndKey(PageUtils<T> pageUtils,String key,int value);
}
